package com.system.api.setting.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import java.io.Serializable;
import java.time.LocalDateTime;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.yang.database.orm.entity.BaseModel;

import static com.system.common.constant.MessageConstant.TEMPLATE_MODULE_EMPTY;
import static com.system.common.constant.MessageConstant.TEMPLATE_VALUE_EMPTY;

/**
 * 文件模版对象
 *
 * @author: lslands
 * @version: 1.0
 * @create: 2024/5/15
 * @description:
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SysTemplate extends BaseModel {

  /**
   * 模版名称
   *
   * @mock 图标管理模版
   * @required
   */
  @NotBlank(message = TEMPLATE_VALUE_EMPTY)
  private String name;

  /**
   * 所属模块(关联菜单ID)
   *
   * @mock 1
   * @required
   */
  @NotNull(message = TEMPLATE_MODULE_EMPTY)
  private Long module;

  /**
   * 模版地址
   * @mock 图标管理模版
   */
  private String url;

  /**
   * 文件桶名称
   * @mock template
   */
  private String bucketName;

  /**
   * 模版类型
   * @mock .xlsx
   */
  private String type;

  public SysTemplate(Long id, Integer enabled, Integer revision) {
    super(id, enabled, revision);
  }
}
